Add proposal app skeleton for styling configs handling#1
Add proposal app skeleton for styling configs handling#1
Conversation
|
I love the idea. |
|
The idea behind this is to make code styling unified between all developers without big efforts. It's done by pre-commit app which installs pre-commit hook and then on each commit, runs a set of tools to reformat code and fix common mistakes. Tools used in this proposal are:
To use all this, first develop needs to install pre-commit: Then:
That should be it. Now on commits all staged files will be checked and, if needed, reformatted. In case of any errors, pre-commit will show them to user and abort the commit. Eslint and flake8 will help dev to avoid issues at development time by showing errors/warnings in the editor (all majors are supporting eslint and flake8). |
|
@jab3z your comments are welcome |
|
@ecugol tsconfig.json, maybe? |
|
migration files should be excluded from any linter |
|
@jab3z i think they are excluded on all python-related stuff. Is eslint trying to find there something? |
|
@ecugol i said just an added measure, don't know if they are excluded by default. |
@RamezIssac Hello Ramez. Here's what i am thinking of for our styling app inside kn_defaults. Basically we can have overwritable linters/stylers configs and use a command to copy those into project's root.
Also there should be a check to ensure pre-commit app is installed, so all those linters/stylers will work once user installs pre-commit hook.
Current configs are stolen from Odoo project, and we need to discuss them.